//
//  NewsCell.m
//  WXMovie
//
//  Created by HZApple on 16/3/31.
//  Copyright © 2016年 无限互联. All rights reserved.
//

#import "NewsCell.h"

@implementation NewsCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setModel:(NewsModel *)model {
    
    _model = model;
    
    [_postImageView sd_setImageWithURL:[NSURL URLWithString:model.image] placeholderImage:[UIImage imageNamed:@"pig"]];
    
    NSString *str = [NSString string];
    switch (model.newsType) {
        case WordType:
            str = nil;
            break;
        case ImageType:
            str = @"sctpxw";
            break;
        case VideoType:
            str = @"scspxw";
            break;
        default:
            break;
    }
    _logoImageview.image = [UIImage imageNamed:str];
    _titileLabel.text = model.title;
    _contentLabel.text = model.summary;
      
}

@end
